<?php
namespace app\common\validate;

use think\Validate;

class Admin extends Validate
{
    protected $rule =[
        ['account','require','用户名不能为空'],
        ['pwd','require','密码不能为空'],
        ['phone','number|length:11','手机号格式不正确|手机号长度不正确'],
        ['email','email','邮箱格式不正确'],

    ];
    protected $scene = [
        'login' => ['account','pwd'],
        'add' => ['account','pwd','phone','email']
    ];
}